<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>获取指定索引的头名称</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.exif-read-data.html">« exif_read_data</a></li>
      <li style="float: right;"><a href="function.exif-thumbnail.html">exif_thumbnail »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.exif.html">Exif 函数</a></li>
    <li>获取指定索引的头名称</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.exif-tagname" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">exif_tagname</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">exif_tagname</span> &mdash; <span class="dc-title">获取指定索引的头名称</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.exif-tagname-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>exif_tagname</strong></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$index</code></span>): <span class="type"><span class="type">string</span>|<span class="type"><span class="type false">false</span></span></span></div>

 </div>

 <div class="refsect1 parameters" id="refsect1-function.exif-tagname-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">index</code></dt>

     <dd>

      <p class="para">
       要查找的标签名称的 ID。
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.exif-tagname-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   返回头名称。
   如果 <code class="parameter">index</code> 参数不是预定义的 EXIF 标签 id，则返回 <strong><code>false</code></strong>
  </p>
 </div>

 <div class="refsect1 examples" id="refsect1-function.exif-tagname-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2606">
    <p><strong>示例 #1 <span class="function"><strong>exif_tagname()</strong></span> 函数例程</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"256:&nbsp;"</span><span style="color: #007700">.</span><span style="color: #0000BB">exif_tagname</span><span style="color: #007700">(</span><span style="color: #0000BB">256</span><span style="color: #007700">).</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #DD0000">"257:&nbsp;"</span><span style="color: #007700">.</span><span style="color: #0000BB">exif_tagname</span><span style="color: #007700">(</span><span style="color: #0000BB">257</span><span style="color: #007700">).</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents"><p>以上例程会输出：</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
256: ImageWidth
257: ImageLength
</pre></div>
    </div>
   </div>
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.exif-tagname-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.exif-imagetype.html" class="function" rel="rdfs-seeAlso">exif_imagetype()</a> - 判断一个图像的类型</span></li>
    <li class="member"><a href="http://exif.org/Exif2-2.PDF" class="link external">&raquo;&nbsp;EXIF 规范</a></li>
    <li class="member"><a href="http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html" class="link external">&raquo;&nbsp;EXIF 标签</a></li>
   </ul>
  </p>
 </div>

</div></div></div></body></html>